package top.starmc.starpet

import org.bukkit.Bukkit
import taboolib.common.platform.Plugin
import top.starmc.starpet.util.getPlayerData
import top.starmc.starpet.util.loadPlayerData

object StarPet : Plugin() {
    override fun onEnable() {
        Bukkit.getOnlinePlayers().forEach {
            it.loadPlayerData()
        }
    }

    override fun onDisable() {
        Bukkit.getOnlinePlayers().forEach {
            it.getPlayerData(true).saveData()
        }
    }
}